<html>
<head>
    @include('v1.common.meta')
    <link rel="stylesheet" href="{{elixir('css/password.css')}}">
</head>
<body>
<div class="yjs-grid">
    <div class="yjs-grid-box">
        <div class="layui-tab">
            @if(Auth::check())
                <div class="layui-container">
                    <div class="layui-row  hidden-tips">
                        <div class="layui-col-md12">
                            <blockquote class="layui-elem-quote">
                                温馨提示：{{$profileData['name']}}@if($isStaff===1)老师 @else同学 @endif, 存在"<i
                                        class="layui-icon">&#xe605;</i>"标识的表单项，建议您自主编辑维护。
                            </blockquote>
                        </div>
                    </div>
                    <div class="layui-row">
                        <div class="layui-col-md12">
                            <fieldset class="layui-elem-field">
                                <legend>个人密码维护</legend>
                                <div class="layui-field-box">
                                    <div class="layui-form layui-form-pane" name="passwordForm" action="javascript:;"
                                         method="POST">
                                        <input type="hidden" name="code" value="{{$profileData['code']}}">
                                        <div class="layui-row">
                                            <div class="layui-col-md6">
                                                <div class="layui-form-item">
                                                    <label class="layui-form-label">登录账号</label>
                                                    <div class="layui-input-inline">
                                                        <input type="text" value="{{$profileData['code']}}" disabled
                                                               class="layui-input">
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="layui-col-md6">
                                                <div class="layui-form-item">
                                                    <label class="layui-form-label"><i class="layui-icon">&#xe605;</i>原密码</label>
                                                    <div class="layui-input-inline">
                                                        <input type="password" name="password" required
                                                               lay-verify="required"
                                                               placeholder="请输入原密码" maxlength="64" autocomplete="off"
                                                               class="layui-input">
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="layui-row">
                                            <div class="layui-col-md6">
                                                <div class="layui-form-item">
                                                    <label class="layui-form-label"><i class="layui-icon">&#xe605;</i>新密码</label>
                                                    <div class="layui-input-inline">
                                                        <input type="password" name="newpwd" id="newpwd" required
                                                               lay-verify="required" maxlength="64" autocomplete="off"
                                                               placeholder="请输入新密码" class="layui-input">
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="layui-col-md6">
                                                <div class="layui-form-item">
                                                    <label class="layui-form-label"><i class="layui-icon">&#xe605;</i>确认密码</label>
                                                    <div class="layui-input-inline">
                                                        <input type="password" name="newpwd_confirmation"
                                                               lay-verify="required|samepwd" maxlength="64"
                                                               autocomplete="off" placeholder="请输入确认密码"
                                                               class="layui-input">
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="layui-row">
                                            <div class="layui-col-md6">
                                                <div class="layui-form-item">
                                                    <label class="layui-form-label">验证码</label>
                                                    <div class="layui-input-inline">
                                                        <input type="text" name="captcha" maxlength="4"
                                                               lay-verify="required"
                                                               placeholder="请输入图片验证码" autocomplete="off"
                                                               class="layui-input">
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="layui-col-md3">
                                                <div class="layui-form-item">
                                                    <img class="getLVcode" src="{{ captcha_src('mini') }}" width="70px"
                                                         height="34px" style="border: 1px solid green;"/>
                                                    <div class="layui-form-mid layui-word-aux fr">
                                                        点击图片刷新验证码
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="layui-col-md3">
                                                &nbsp;
                                            </div>
                                        </div>
                                        <div class="layui-row">
                                            <div class="layui-col-md1">
                                                <button type="submit" class="layui-btn layui-btn-normal"
                                                        lay-filter="okEvent" lay-submit>确 认
                                                </button>
                                            </div>
                                            <div class="layui-col-md1">
                                                &nbsp;
                                            </div>
                                            <div class="layui-col-md1">
                                                <button type="button" class="layui-btn layui-btn-primary cancelEvent">取
                                                    消
                                                </button>
                                            </div>
                                            <div class="layui-col-md9">
                                                &nbsp;
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </fieldset>
                        </div>
                    </div>
                </div>
            @else
                <div class="layui-container">
                    <div class="layui-row">
                        <div class="layui-col-md12">
                            <blockquote class="layui-elem-quote-error">
                                友情提示：该功能只面向已成功登录系统，并具有相应权限的用户可用。
                            </blockquote>
                        </div>
                    </div>
                </div>
            @endif
        </div>
    </div>
</div>

@include('v1.common.js')
<script src="{{elixir('js/password.js')}}"></script>
</body>
</html>